<?php namespace Admin\Controller;
/*
 * 网站配置控制器
 * */
 	class WebController extends CommonController
 	{
 		protected $db;
		public function __init()
		{
			$this->db = new \Common\Model\Web;
		}
 		public function index()
		{
			//获得元数据
			$data = $this->db->where()->get();
			View::with("data",$data);
			if(IS_POST){
				if(!$this->db->edit()){
					View::error($this->db->getError());
				}else{
					View::success("编辑成功",U("index"));
				}
			}
			View::make("webSet");
		}
 	}
